
MONO = mono
MCS = gmcs
KEY_FILE = ../qdb.snk
MCS_FLAGS = -debug+ -keyfile:$(KEY_FILE) -define:NET_2_0,MONO,EMBEDDED
OUTDIR = ../bin
WORKDIR = .
RESPONSE_FILE = $(WORKDIR)/sources

CORE = Qdb.dll
CS = Qdb.CS.dll
OPTIONAL = Qdb.Optional.dll
TESTS = Qdb.Tests.exe
UNIT = QdbUnit.dll
UNIT_EXT = QdbUnit.Extensions.dll
INSTR = Qdb.Instrumentation.dll
NQ = Qdb.NativeQueries.dll
TOOL = QdbTool.exe
TOOL_TESTS = QdbTool.Tests.exe
LINQ = Qdb.Linq.dll
LINQ_TESTS = Qdb.Linq.Tests.exe
LINQ_INSTR_TESTS = Qdb.Linq.Instrumentation.Tests.exe

CECIL = Mono.Cecil.dll
FLOWANALYSIS = Cecil.FlowAnalysis.dll
GETOPTIONS = Mono.GetOptions.dll

build: precompile compile postcompile

precompile:
	[ -d $(OUTDIR) ] || mkdir $(OUTDIR)
	find $(WORKDIR) -name "*.cs" > $(RESPONSE_FILE)

compile:
	$(MCS) -t:$(TARGET) $(REFERENCES) -warn:0 -out:$(OUTDIR)/$(ASSEMBLY) $(MCS_FLAGS) $(OPT_MCS_FLAGS) @$(RESPONSE_FILE)

postcompile:
	rm -f $(RESPONSE_FILE)
